package cn.edu.zut.service;

import cn.edu.zut.domin.Book;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 *
 */
public interface IBookService {

    /**
     * 查询所有书籍
     * @return
     * @throws Exception
     */
    public List<Book> findAll(int page, int size) throws Exception;

    /**
     * 查询所有图书信息-不分页
     * @return
     * @throws Exception
     */
    public List<Book> findAll() throws Exception;

    /**
     * 查询一本书ById
     * @return
     * @throws Exception
     */
    public List<Book> findBookById(String id) throws Exception;

    /**
     * 保存一本书
     * @param book
     * @throws Exception
     */
    public void saveBook(Book book) throws Exception;

    /**
     * 删除一本书
     * @param id
     * @throws Exception
     */
    public void deleteBook(String id) throws Exception;

    /**
     * 更新一本书byid
     * @param book
     * @throws Exception
     */
    public void updateBook(Book book) throws Exception;

    /**
     * 查询一本书byname
     * @param name
     * @return
     * @throws Exception
     */
    public List<Book> findBookByName(String name) throws Exception;

    /**
     * 名称模糊查询
     * @param name
     * @return
     * @throws Exception
     */
    public List<Book> findBookByNameMOHU(String name) throws Exception;
    public List<Book> findBookByPublisher(String name) throws  Exception;
    public List<Book> selectBookLendInfoByBookId(String Id);
    public List<Book> selectAllBookLendInfoByBookId();
}
